package com.tianji.agent;

import com.tianji.config.SystemPromptConfig;
import com.tianji.constants.Constant;
import com.tianji.enums.AgentTypeEnum;
import com.tianji.service.impl.AbstractAgent;
import com.tianji.tools.OrderTools;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@RequiredArgsConstructor
public class BuyAgent extends AbstractAgent {


    private final SystemPromptConfig systemPromptConfig;

    private final OrderTools orderTools;

    @Override
    public AgentTypeEnum getAgentType() {
        return AgentTypeEnum.BUY;
    }

    @Override
    public String systemMessage() {
        return systemPromptConfig.getBuyAgentSystemMessage().get();
    }


    @Override
    public Object[] tools() {
        return new Object[]{orderTools};
    }

    @Override
    public Map<String, Object> toolContext(AgentParams params) {
        return Map.of(Constant.REQUEST_ID,params.getRequestId(),
                Constant.USER_ID,params.getUserId());
    }
}